<include file='Base:header' />
	<style type="text/css">
		.more_content{
			line-height: 24px;
			max-height: 48px;
			overflow : hidden;
			text-overflow: ellipsis;
			display: -webkit-box;
			-webkit-line-clamp: 2;
			-webkit-box-orient: vertical;
		}
		.more{
			margin-right: 12px;
			font-size: 17px;
			line-height: 24px;
			color: black;
			display: block;
			float: right;
		}
	</style>
	
	

		<div class="approval">
			<h1 class="title">
				<a class="back" href="{$goback}">
					<img class="fl" src="__IMG__/back.png" style="margin-left: 5%;"/>
				</a>
				消息
				<a class="home" href="__APP__">
					<img class="fl" src="__IMG__/home_logo.png" style="margin-right: 5%;"/>
				</a>
			</h1>
			<include file='Base:_userinfo' />
				
<!-- 			<div class="weui-flex" style="margin-top: 20px;">
				<div class="weui-flex__item" style="text-align: center;">
					<a href="{:U('auditAll',['status'=>1,'ids'=>$ids])}" class="weui-btn weui-btn_mini weui-btn_primary ajax-get" >全部通过</a>
				</div>
				<div class="weui-flex__item"></div>						
				<div class="weui-flex__item" style="text-align: center;">
					<a href="javascript:;" class="weui-btn weui-btn_mini weui-btn_warn return" id='{$ids}'>全部退回</a>
				</div>
			</div>
			 -->
			<php>$type = C('APPLY_TYPE');$vacatype = C('VACATION_TYPE');</php>
			<notempty name='list'>
			
				<volist name='list' id='vo'>
					<div class="weui-cells">
						<div class="weui-media-box weui-media-box_text" status="{$vo.status}" style="padding-bottom: 5px;">
							<h4 class="weui-media-box__title" style="white-space: inherit;word-break: inherit;">
								<span>{$vo.from_name}</span>于<span>{$vo.start_time}</span>至<span>{$vo.end_time}</span>
							</h4>
						    <p class="weui-media-box__desc" style="overflow: inherit;display:block;height: auto;">
						    	申请{$vo.content}
						    </p>
						</div> 

					</div>
					
					
			        <!--<div class="weui-cells" style="padding: 10px;">
			        	<p>
			        		<span>{$vo.name}</span>于<span>{$vo.start_time}</span>至<span>{$vo.end_time}</span>
			        		<p>类型:{$vo[type] == 2 ? $vacatype[$vo[vacate_type]] :$type[$vo[type]]}</p>
			        		<p class="more_content">原因:{$vo.content}</p>
			        	</p>
			        	<div class="weui-flex" style="margin-top: 5px;">
							<div class="weui-flex__item"></div>	
							<div class="weui-flex__item"></div>	
							<div class="weui-flex__item" style="text-align: center;">
								<a href="{:U('auditPass',['status'=>1,'id'=>$vo[id]])}" class="weui-btn weui-btn_mini weui-btn_primary ajax-get">通过</a>
							</div>					
							<div class="weui-flex__item" style="text-align: center;">
								<a href="javascript:;" class="weui-btn weui-btn_mini weui-btn_warn return" id='{$vo.id}'>退回</a>
							</div>
						</div>
			        </div>-->
				</volist>
				<else />
				<p class='nodata'>暂无数据</p>
			</notempty>

		</div>

		<include file='Base:footer' />
		
		
		<script type="text/javascript">
			$(".more_content").click(function(){
				var height = $(this).height();
				if(height >= "48"){
					$(this).height("auto")
				}
			})
			var topten_text = $(this).prev(".topten_text").height();
			$(".more").click(function(){
				if(topten_text == "35") {
				} else {
				}
			})
			$(".return").click(function(event){
				event.preventDefault();
				var rejectUrl = $(this).attr('href');
				
				$.prompt({
				  title: '理由',
//				  text: '内容文案',
				  input: '请输入理由',
				  empty: true, // 是否允许为空
				  onOK: function (input) {
				    //点击确认,执行ajax发送函数
					ajaxGet(rejectUrl,{reject_reason:input});
				    return false;
				  },
				  onCancel: function () {
				    //点击取消
				  }
				});
			})
		</script>
